<?php
session_start();
require('includes/connect.php');
$user_id=$_SESSION['user_id'];
/*if(isset($_POST["every"]) && !empty($_POST["every"])){	
	$every=array_values($_POST["every"]);	
	//$news_id=array_values($_POST["news_id"]);
	$count=sizeof($every);										  
	for($i=0;$i<=$count;$i++){					  						  					  
		if(trim($every[$i])!=''){
			$Every=addslashes(trim($every[$i]));	
			$sql="INSERT INTO user_shared(`user_id`,`share_things_id`,`things_share_id`) VALUES ('$user_id','1','$Every')";
							$result=mysql_query($sql);
				
		}										
	}
}	 
if(isset($_POST["myfrds"]) && !empty($_POST["myfrds"])){	
	$myfrds=array_values($_POST["myfrds"]);
	
	//$news_id=array_values($_POST["news_id"]);
	$count=sizeof($myfrds);										  
	for($i=0;$i<=$count;$i++){					  						  					  
		if(trim($myfrds[$i])!=''){
			$MyFrds=addslashes(trim($myfrds[$i]));	
			$sql="INSERT INTO user_shared(`user_id`,`share_things_id`,`things_share_id`) VALUES ('$user_id','1','$MyFrds')";
							$result=mysql_query($sql);
				
		}										
	}
}	 
if(isset($_POST["frds_of_frds"]) && !empty($_POST["frds_of_frds"])){	
	$frds_of_frds=array_values($_POST["frds_of_frds"]);
	
	//$news_id=array_values($_POST["news_id"]);
	$count=sizeof($frds_of_frds);										  
	for($i=0;$i<=$count;$i++){					  						  					  
		if(trim($frds_of_frds[$i])!=''){
			$Frds_Of_Frds=addslashes(trim($frds_of_frds[$i]));	
			$sql="INSERT INTO user_shared(`user_id`,`share_things_id`,`things_share_id`) VALUES ('$user_id','1','$Frds_Of_Frds')";
							$result=mysql_query($sql);
				
		}										
	}
}	 
if(isset($_POST["celebrity"]) && !empty($_POST["celebrity"])){	
	$celebrity=array_values($_POST["celebrity"]);
	
	//$news_id=array_values($_POST["news_id"]);
	$count=sizeof($celebrity);										  
	for($i=0;$i<=$count;$i++){					  						  					  
		if(trim($celebrity[$i])!=''){
			$Celebrity=addslashes(trim($celebrity[$i]));	
			$sql="INSERT INTO user_shared(`user_id`,`share_things_id`,`things_share_id`) VALUES ('$user_id','1','$Celebrity')";
							$result=mysql_query($sql);
				
		}										
	}
}	*/
if(isset($_POST["fans"]) && !empty($_POST["fans"])){
	
	$fans=array_values($_POST["fans"]);
	
	//$news_id=array_values($_POST["news_id"]);
	$count=sizeof($fans);										  
	for($i=0;$i<=$count;$i++){					  						  					  
		if(trim($fans[$i])!=''){
			$Fans=addslashes(trim($fans[$i]));	
			echo $Fans;
			//$sql="INSERT INTO user_shared(`user_id`,`share_things_id`,`things_share_id`) VALUES ('$user_id','1','$Fans')";
							//$result=mysql_query($sql);
				
		}										
	}
}	 

//header("location:settings.php");
?>